
namespace Crux.Core.MongoDb;
/// <summary>
/// IMongoDBContext
/// </summary>
public interface IMongoDBContext
{
    /// <summary>
    ///
    /// </summary>
    IMongoDatabase Database { get; }
    /// <summary>
    ///
    /// </summary>
    /// <typeparam name="K"></typeparam>
    /// <typeparam name="TPrimary"></typeparam>
    /// <returns></returns>
    IMongoCollection<K> DbSet<K, TPrimary>() where K : IGenericEntity<TPrimary>;
    /// <summary>
    ///
    /// </summary>
    /// <typeparam name="K"></typeparam>
    /// <typeparam name="TPrimary"></typeparam>
    /// <param name="name"></param>
    /// <returns></returns>
    IMongoCollection<K> DbSet<K, TPrimary>(string name) where K : IGenericEntity<TPrimary>;
}